import React from 'react';
import { history } from 'umi';

import type { ReactNode } from 'react';

import Andon from '@/assets/images/Andon.svg';

import styles from './index.less';
type Props = {
  children: ReactNode;
};

const LoginRegisCommonBg: React.FC<Props> = (props: Props) => {
  return (
    <div className={styles.registerContent}>
      <div className={styles.leftContent}>
        <div onClick={() => history.push('/')} className={styles.content}>
          <div className={styles.logo}>
            <img src={Andon} alt="" />
          </div>
          <div className={styles.word}>
            <div>Andon</div>
            <div>异常快速反应系统</div>
          </div>
        </div>
      </div>
      <div className={styles.rightContent}>{props.children}</div>
    </div>
  );
};
export default LoginRegisCommonBg;
